<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Badge
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
?>

<?php 
$badge = $this->request->getBadge();
$user = $this->request->getUser();

?>
<div style='margin: 13px;'>
<h3><?php echo $this->translate('Request Details')?></h3>
<?php echo $this->translate('Requested Badge: %s', $badge->__toString())?>
<br />
<?php echo $this->translate('By Member: %s', $user->__toString())?>
<br />
<span style="font-weight: bold"><?php echo $this->translate('Membership Requirements:'); ?></span> 
<?php $errors = $badge->checkMemberRequirements($user); ?>
<?php if (count($errors)): ?>
  <?php echo $this->translate('Failed'); ?>
  <ul>
    <?php foreach ($errors as $error => $val): ?>
      <li> - <?php echo $this->translate("BADGE_REQ_ERROR_".strtoupper($error));?></li>
    <?php endforeach; ?>
  </ul>
<?php else: ?>
  <?php echo $this->translate('Passed'); ?>
<?php endif; ?>

<br /><br /><span style="font-weight: bold"><?php echo $this->translate('Message To Admin:'); ?></span>
<br />
<?php echo nl2br($this->request->getDescription()); ?>
</div>
  <?php echo $this->form->setTitle(null)->render($this) ?>
